
import javax.microedition.lcdui.Graphics;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author tsuchimoto
 */
class Shape
{
    public float m_X;
    public float m_Y;
    public float m_VX;
    public float m_VY;
    public int m_Blush;
    public int m_Color;
    public int m_Width;
    public int m_Height;
    public boolean m_Show=true;

    public static final int RECTANGLE=0;
    public static final int ELLIPSE=1;

    void paint(Graphics aGraphics)
    {
        if (!m_Show)
            return;

        aGraphics.setColor(m_Color);
        switch(m_Blush)
        {
            case RECTANGLE:
                aGraphics.fillRect((int)(m_X-(m_Width/2)), (int)(m_Y-(m_Height/2)), m_Width, m_Height);
                break;
            case ELLIPSE:
                aGraphics.fillArc((int)(m_X-(m_Width/2)), (int)(m_Y-(m_Height/2)), m_Width, m_Height, 0, 360);
                break;
        }
    }

}
